package com.zhxy.util.bean;

import static org.junit.Assert.*;

import java.util.HashMap;

import org.junit.Test;

import com.zhxy.util.bean.BeanSetter;

public class BeanSetterTestCase {

	@Test
	public void test() throws Exception {
		
		BeanSetter setter = new BeanSetter();
		
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("integer", 12345);
		map.put("string", "string value");
		map.put("string2", "string value");
		
		SampleBean bean = new SampleBean();
		setter.setProperty(bean, map);
		
		assertEquals(bean.getInteger(), 12345);
		assertEquals(bean.getString(), "string value");

	}

}
